#include <iostream>
#include <vector>
#include <vector>
using namespace std;
// #define int long long
#define endl '\n'
#define P pair<int, int>
#define x first
#define y second
constexpr int maxl = 1e6 + 7;
int n, m;
vector<int> G[maxl];
int color[maxl];
int half1, half2, ans;

bool dfs(int u, int tag) {
  color[u] = tag;
  if (color[u] == 1) half1++;
  else half2++;

  for (const auto& v : G[u]) {
    if (!color[v] && !dfs(v, 3 - tag)) return 0;
    else if (color[v] == tag) return 0;
  }

  return 1;
}

void solve() {
  cin >> n >> m;
  for (int i = 1, u, v; i <= m; i++) {
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }

  for (int i = 1; i <= n; i++) {
    if (color[i]) continue;;
    half1 = 0, half2 = 0;
    if (!dfs(i, 1)) {
        cout << "Impossible" << endl;
        return;
    }
    ans += min(half1, half2);
  }

  cout << ans << endl;
}

signed main(){
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int t = 1;
  // cin >> t;
  while(t--) solve();
  return 0;
}